package com.syaccp.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@ApiModel(value = "CustomerAddAndUpdateRequest",description = "新增和修改客户时传递过来的数据")
@Data
public class CustomerAddAndUpdateRequest {


    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "客户姓名")
    @NotBlank
    private String customerName;

    @ApiModelProperty(value = "客户所在公司，可为空")
    private String customerCompany;

    @ApiModelProperty(value = "电话号码")
    @NotNull(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phone;

    @ApiModelProperty(value = "制作等级")
    @NotNull
    private Integer makeId;

    @ApiModelProperty(value = "消费等级")
    @NotNull
    private Integer consumeId;

    @ApiModelProperty(value = "客户等级")
    @NotNull
    private Integer levelId;

    @ApiModelProperty(value = "自定义标签")
    private Integer tagId;

    @ApiModelProperty(value = "客户所在地址，可为空")
    private String address;

    @ApiModelProperty(value = "客户状态")
    private Integer status;
}
